package basics;

/**
 * @author lyx
 * @Date 2021/6/30 15:48
 */
public class Recursion {
    public static void main(String[] args) {
        System.out.println(recursionMethod(15));
        int[] num1 = new int[]{1,2,3,4};//定义数组

    }
    //计算阶层
    public static int recursionMethod(int i){
        if (i == 1) {
            return i;
        } else {
            return i * recursionMethod(i-1);
        }
    }

}
